<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">预警参数设置</h3>
        </div>
        <div class="panel-body">
            <div id="formContent"></div>
        </div>
        <div class="panel-footer">
            <div class="row">
                <div class="col-sm-5 col-md-offset-5">
                    <button type="button" class="btn  btn-success"
                            onclick="save()">
                        <i class="fa fa-check-square-" aria-hidden="true"></i>保&nbsp;存
                    </button>
<!--                    <button type="button" class="btn btn-primary col-md-offset-1" onclick="addForm()">-->
<!--                        <i class="fa fa-plus" aria-hidden="true"></i>再添加一类预警-->
<!--                    </button>-->
                </div>
            </div>
        </div>
    </div>

</div>
<div th:include="include :: footer"></div>

<script type="text/html" id="formTemplate">
    {{each list}}
    {{set iRandom = random()}}
    <div class="form-horizontal-div">
        <form class="form-horizontal">
            <input type="hidden" name="iRandom" value="{{iRandom}}">
            <div class="row">
                <div class="col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">疾病预警参数设置</div>
                        <div class="panel-body">
                            <div class="row form-group">
                                <label for="lowerBodyTemperature" class="col-sm-4 control-label">体温低于(℃)</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="warningSet.sick.lowerBodyTemperature"
                                           value="{{$value.warningSet.sick.lowerBodyTemperature}}"
                                           placeholder="小于该体温预警">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label for="upperBodyTemperature" class="col-sm-4 control-label">体温高于(℃)</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="warningSet.sick.upperBodyTemperature"
                                           value="{{$value.warningSet.sick.upperBodyTemperature}}"
                                           placeholder="或者体温超过">
                                </div>
                            </div>
                            <div class="row form-group" style="height: 32px">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">发情预警参数设置</div>
                        <div class="panel-body">
                            <div class="row form-group">
                                <label for="startBirthday" class="col-sm-4 control-label">开始预警时间</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="warningSet.oestrus.startBirthday"
                                           value="{{$value.warningSet.oestrus.startBirthday}}"
                                           placeholder="距出生日期（大于，天数）">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label for="endBirthday" class="col-sm-4 control-label">结束预警时间</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="warningSet.oestrus.endBirthday"
                                           value="{{$value.warningSet.oestrus.endBirthday}}"
                                           placeholder="距出生日期（小于，天数）">
                                </div>
                            </div>
                            <div class="row form-group" style="height: 32px">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">生产预警参数设置</div>
                        <div class="panel-body">
                            <div class="row form-group">
                                <label for="startHybridizationDay" class="col-sm-4 control-label">开始预警时间</label>
                                <div class="col-sm-8 ">
                                    <input type="text" class="form-control"
                                           name="warningSet.parturition.startHybridizationDay"
                                           value="{{$value.warningSet.parturition.startHybridizationDay}}"
                                           placeholder="距配种日期（大于，天数）">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label for="endHybridizationDay" class="col-sm-4 control-label">结束预警时间</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"
                                           name="warningSet.parturition.endHybridizationDay"
                                           value="{{$value.warningSet.parturition.endHybridizationDay}}"
                                           placeholder="距配种日期（小于，天数）">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label for="upperBodyTemperature" class="col-sm-4 control-label">体温超过(℃)</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"
                                           name="warningSet.parturition.upperBodyTemperature"
                                           value="{{$value.warningSet.parturition.upperBodyTemperature}}"
                                           placeholder="体温超过">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-8 col-md-8">
                    <div class="panel panel-default">
                        <div class="panel-heading">基站告警设置</div>
                        <div class="panel-body">
                            <div class="row form-group">
                                <label class="col-sm-2 control-label">GPS天线状态</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control col-sm-2" name="warningSet.station.daGpsDuration" style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daGpsDuration}}"
                                           placeholder="" title="填写数字。n分钟内GPS天线都是异常状态，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数字。n分钟内GPS天线都是异常状态，视为失控基站" title="填写数字。n分钟内GPS天线都是异常状态，视为失控基站">
                                </div>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daGpsTimes"  style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daGpsTimes}}"
                                           placeholder="" title="填写数值。连续m次心跳GPS天线都是异常状态，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续m次心跳GPS天线都是异常状态，视为失控基站" title="填写数值。连续m次心跳GPS天线都是异常状态，视为失控基站">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label class="col-sm-2 control-label">市电源状态</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daPowerDuration"  style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daPowerDuration}}"
                                           title="填写数值。连续n分钟内都是市电源异常状态，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续n分钟内都是市电源异常状态，视为失控基站" title="填写数值。连续n分钟内都是市电源异常状态，视为失控基站">
                                </div>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daPowerTimes" style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daPowerTimes}}"
                                            title="填写数值。连续m次心跳市电源都是异常状态，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续m次心跳市电源都是异常状态，视为失控基站" title="填写数值。连续m次心跳市电源都是异常状态，视为失控基站">
                                </div>
                            </div>

                            <div class="row form-group">
                                <label class="col-sm-2 control-label">基站电池电压</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daElecDuration" style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daElecDuration}}"
                                            title="填写数值。连续n分钟内基站电池电压低于最小电压，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续n分钟内基站电池电压低于最小电压，视为失控基站" title="填写数值。连续n分钟内基站电池电压低于最小电压，视为失控基站">
                                </div>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daElecTimes" style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.daElecTimes}}"
                                            title="填写数值。连续m次心跳，基站电池电压低于最小电压，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续m次心跳，基站电池电压低于最小电压，视为失控基站" title="填写数值。连续m次心跳，基站电池电压低于最小电压，视为失控基站">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.daElecMin" style="float: left;width: 22%"
                                             value="{{$value.warningSet.station.daElecMin}}"
                                             title="填写数值。设置基站电池最小电压">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。设置基站电池最小电压" title="填写数值。设置基站电池最小电压">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label class="col-sm-2 control-label">心跳数据上传</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" name="warningSet.station.upLoadDuration" style="float: left;width: 22%"
                                           value="{{$value.warningSet.station.upLoadDuration}}" title="填写数值。连续n分钟平台未收到基站心跳数据，视为失控基站">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续n分钟平台未收到基站心跳数据，视为失控基站" title="填写数值。连续n分钟平台未收到基站心跳数据，视为失控基站">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">耳标告警设置</div>
                        <div class="panel-body">
                            <div class="row form-group">
                                <label class="col-sm-2 control-label">耳标电压</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="warningSet.tag.daElecDuration" style="float: left;width: 22%"
                                           value="{{$value.warningSet.tag.daElecDuration}}"
                                           placeholder="" title="填写数字。n分钟内耳标电压连续低于最小电压，视为失控耳标">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数字。n分钟内耳标电压连续低于最小电压，视为失控耳标" title="填写数字。n分钟内耳标电压连续低于最小电压，视为失控耳标">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="warningSet.tag.daElecTimes" style="float: left;width: 22%"
                                           value="{{$value.warningSet.tag.daElecTimes}}"
                                           placeholder="" title="填写数值。m次数据耳标电压连续低于最小电压，视为失控耳标">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。m次数据耳标电压连续低于最小电压，视为失控耳标" title="填写数值。m次数据耳标电压连续低于最小电压，视为失控耳标">
                                </div>
                            </div>
                            <div class="row form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="warningSet.tag.daElecMin" style="float: left;width: 22%"
                                           value="{{$value.warningSet.tag.daElecMin}}"
                                           placeholder="" title="填写数值。设置耳标最小电压">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。设置耳标最小电压" title="填写数值。设置耳标最小电压">
                                </div>
                            </div>

                            <div class="row form-group">
                                <label class="col-sm-2 control-label">心跳数据上传</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="warningSet.tag.upLoadDuration" style="float: left;width: 22%"
                                           value="{{$value.warningSet.tag.upLoadDuration}}"
                                           placeholder="" title="填写数值。连续n分钟平台未收到基站心跳数据，视为失控耳标">
                                    <input type="text" class="form-control"  style=" float: left;width: 78%"  disabled value="填写数值。连续n分钟平台未收到基站心跳数据，视为失控耳标" title="填写数值。连续n分钟平台未收到基站心跳数据，视为失控耳标">
                                </div>
                            </div>

                            <div class="row form-group" style="height: 12px">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row form-group">
                <div class="col-sm-6 col-md-4">
                    <label  class="col-sm-4 control-label">弹窗提示开关</label>
                    <div class="col-sm-8">
                        <sys:dict type="station_tip_switch" id="dialogTipSwitch{{iRandom}}" name="dialogTipSwitch" class="form-control chosen-select"    firstValue="" firstText="请选择是否开启弹出提示"  />
                    </div>
                </div>
            </div>
        </form>
        {{if $index+1
        <list.length }}
        <h5 class="page-header"></h5>
        {{/if}}
    </div>
    {{/each}}
</script>


<script type="text/javascript" src="js/appjs/animal/warningSet/warningSet.js"></script>
</body>
</html>
